package com.wang.learrn.common.data;

import lombok.Getter;
import lombok.Setter;
import org.springframework.util.Assert;

/**
 * @author : wcz
 * @version V1.0
 * @Description: TODO
 */
public abstract class TenantCommand extends BaseCommand{


    @Getter
    @Setter
    private Long tenantId;

    /**
     * 校验规则方法
     */
    @Override
    public abstract void validate();

    @Override
    public void doValidate() {
        Assert.notNull(getOperatorId(),"operator must not be null");
        Assert.notNull(tenantId,"operator must not be null");
        validate();
    }
}
